#-*- coding:utf-8 -*-
from django.shortcuts import render_to_response,get_object_or_404
from django.http  import  HttpResponseRedirect
from dj_outbound_stats.models import Link , Click

def outbound(request,outbound_link_id):
    link = get_object_or_404(Link,id=outbound_link_id)
    click = Click(link=link)
    click.save()
    outbound_url = link.url
    return HttpResponseRedirect(outbound_url)
